package com.xmy.study.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 数学应通关数-(正确、修正)
 * </p>
 *
 * @since 2024-02-20
 */
@TableName("cha_plan")
@Data
public class ChaPlan implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    @TableId(type = IdType.NONE)
    private Long id;

    @ExcelIgnore
    @ApiModelProperty("校区id")
    private Long schoolId;

    @ExcelProperty(index = 2,value = "年份")
    @ApiModelProperty("年份")
    private Integer yearPart;

    @ExcelProperty(index = 3,value = "学期")
    @ApiModelProperty("季度")
    private Integer quarterNum;

    @ExcelIgnore
    @ApiModelProperty("学员id")
    private Long studentId;

    @ExcelIgnore
    @ApiModelProperty("年级")
    private Integer yearClassId;

    @ExcelIgnore
    @ApiModelProperty("版本")
    private Long courseVersionId;

    @ExcelIgnore
    @ApiModelProperty("科目")
    private Long subjectsId;

    @ExcelIgnore
    private Integer taskCategoryId;

    @ExcelProperty(index = 7,value = "分类")
    @TableField(exist = false)
    private String taskCategoryName;

    @ExcelIgnore
    @ApiModelProperty("备注")
    private String remark;

    @ExcelIgnore
    @ApiModelProperty("是否删除，0正常，1删除")
    @TableLogic(value = "0", delval = "1")
    @TableField(select = false)
    private Integer deleted;

    @ExcelIgnore
    @ApiModelProperty("添加时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ExcelProperty(index = 11,value = "正确")
    @ApiModelProperty("应通关-正确题数")
    private Integer rightNum;

    @ExcelProperty(index = 12,value = "修正")
    @ApiModelProperty("应通关-修正题数")
    private Integer amendNum;

    @ExcelProperty(index = 9,value = "课次")
    @ApiModelProperty("课次-另做总人数返回给账务的记录")
    private Integer lessonNum;

    @ExcelIgnore
    private Integer lessonNumFinish;

    @ExcelProperty(index = 10,value = "应通关")
    @ApiModelProperty("应通关")
    private Integer lowestShutnum;

    @ExcelIgnore
    @ApiModelProperty("上课老师")
    private Long teacherId;

    @ExcelIgnore
    @ApiModelProperty("班级id")
    private Long gradeId;

    @ExcelIgnore
    private Long schedulingDetailId;

    @ExcelIgnore
    @ApiModelProperty("")
    private Integer isFinish;

    @ExcelIgnore
    @ApiModelProperty("是否第一条")
    private Integer isFirst;

    @ExcelIgnore
    @ApiModelProperty("会存在多条数据，为了方便统计加个标记")
    private Integer isLast;

    @ExcelProperty(index = 8,value = "刷题次数")
    @ApiModelProperty("刷题次数")
    private Integer brushCount;

    @ExcelIgnore
    private Long classTypeId;

    @ExcelIgnore
    private Long createdId;

    @ExcelIgnore
    private LocalDate addDate;

    @ExcelProperty(index = 1,value = "校区")
    @TableField(exist = false)
    private String schoolName;

    @ExcelProperty(index = 6,value = "班型")
    @TableField(exist = false)
    private String classTypeName;

    @ExcelProperty(index = 5,value = "版本")
    @TableField(exist = false)
    private String courseVersionName;

    @ExcelProperty(index = 0,value = "学员姓名")
    @TableField(exist = false)
    private String studentName;

    @ExcelIgnore
    @TableField(exist = false)
    private String gradeName;

    @ExcelIgnore
    @TableField(exist = false)
    private Integer showPassNum;

    @ExcelIgnore
    @TableField(exist = false)
    private Integer yetPassNum;

    @ExcelIgnore
    @TableField(exist = false)
    private Integer notPassNum;

    @ExcelIgnore
    @TableField(exist = false)
    private Integer datePassNum;

    @ExcelIgnore
    @TableField(exist = false)
    private Integer lowestShutnumAll;//应通关总题数

    @ExcelIgnore
    @TableField(exist = false)
    private Integer rightNumAll;//正确总题数

    @ExcelIgnore
    @TableField(exist = false)
    private Integer amendNumAll;//修正总题数

    @ExcelIgnore
    @TableField(exist = false)
    private Integer errorNumAll;//错误总题数

    @ExcelIgnore
    @ApiModelProperty("头像")
    @TableField(exist = false)
    private String headImg;

    @ExcelProperty(index = 4,value = "年级")
    @ApiModelProperty("年级")
    @TableField(exist = false)
    private String yearClassStr;
}
